
package ai.handlers;

import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.eclipse.swt.custom.StyledText;

public class ClearAnswerHandler {
	@Execute
	public void execute(EPartService partService) {
		MPart part = partService.findPart("ai.part.sample");
		part.getContext().get(StyledText.class).setText("");
	}

	@CanExecute
	public boolean canExecute() {

		return true;
	}

}